<!DOCTYPE html>
<html>
  <head>
    <title>SEM</title>
	<link href="<?php  bloginfo( 'template_url' ); ?>/style.css" rel="stylesheet" media="screen">
  </head>
  <body style="background: transparent;color: #fff;">
	<div class="content-funcy">
		<?php
		$query = new WP_Query(  'pagename=web');
		while ( $query->have_posts() ) : $query->the_post();  		
			$id = get_the_ID();			
		?>
		<div class="title-funcy"><?php the_title(); ?></div>
		<div class="desc-funcy"><?php the_content(); ?></div>			
		<?php   
			endwhile;
		?>
		<div class="desc-funcy">
			<h3>Proyectos</h3>
			<?php 
			$array_proyecto = array();
			$credito = get_post_meta($id, 'proyecto', false);
			foreach($credito as $cre){
				$query_cre = new WP_Query( array( 'post_type' => 'post','name'=>$cre));
				while ( $query_cre->have_posts() ) : $query_cre->the_post();  
					$array_proyecto[] = get_the_ID();					
				endwhile;
			}
			$query = new WP_Query( array( 'post_type' => 'post', 'post__in' => $array_proyecto) );
			while ( $query->have_posts() ) : $query->the_post();  
			?>
				<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
						<?php 
						$id = get_the_ID();
						$img = get_post_meta($id, 'imagen-proyecto', true);
						?>
						<img src="<?php echo $img; ?>" alt="IMG" />
					</a>
			<?php   
			endwhile;
			?>
		</div>
	</div>
  </body>
</html>
      